<template>
  <div>
    <van-nav-bar placeholder fixed>
      <template #left>
        <van-image width="100" height="30" :src="imgUrl" />
        <h3 class="msgTitle">前端学习</h3>
      </template>
      <template #right>
        <van-icon name="user-circle-o" size="30" />
        <h4 @click="login()">请登录</h4>
      </template>
    </van-nav-bar>
  </div>
</template>

<script setup>
import imgUrl from "../assets/img/logo.jpg";
import { useRouter } from "vue-router";

const router = useRouter();

function login() {
  router.push("/login");
}
</script>

<style scoped>

</style>